import { LoginApiResponse, LoginParams } from "@/interface/user/login"
import { Permission } from "@/interface/user/user"

import http from "../helper/request"

export const loginApi = (params: LoginParams) => http.post<LoginApiResponse>("/login", params)

export const logoutApi = () => http.post("/logout")

export const permissionApi = () => http.get<Permission[]>("/system/rolePermission/permissions", { systemType: 4 })

export const noticesApi = () => http.post<Permission[]>("/upcoming/selectUpcoming")
